ci: add next to workflow branch filters - #1025
Merged
Merged
Conversation
kvinwang
force-pushed
the
ci/add-next-branch-filters
branch
from
August 7, 2026 13:12
ddea5f7 to
3ced524
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions workflow branch filters to keep CI running during the planned default-branch rename from master to next, avoiding workflows silently not dispatching due to on.push.branches / on.pull_request.branches base-branch filtering.
Changes:
- Add
nextto themkosi-buildworkflowpush.branchesfilter. - Adjust the
spdx-checkworkflowpush.branchesandpull_request.branchesfilters to includenext(but currently dropsmainfrom the list, which conflicts with the PR description’s stated intent).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/spdx-check.yml | Updates push/PR branch filters for the required reuse-lint workflow to keep running after the default branch rename. |
| .github/workflows/mkosi-build.yml | Updates the post-merge push branch filter to keep mainline mkosi builds running after the rename. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+9
to
+11
| branches: [ master, next ] | ||
| pull_request: | ||
| branches: [ master, main ] | ||
| branches: [ master, next ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
We are about to rename the default branch
master->next. Six of the eight workflows that filter on branch names already listnext(branches: [ master, next, dev-* ]), so they keep working across the rename. Two do not:.github/workflows/spdx-check.yml—branches: [ master, main ].github/workflows/mkosi-build.yml—push.branches: [master]spdx-check.ymlis the blocking one. It producesreuse-lint, which is one of the three required status checks in themerge-protectionruleset (alongsiderust-checksandsdk-tests). GitHub retargets open PRs to the new default branch on rename, andpull_request.branchesfilters on the base branch — so the momentmasterbecomesnext, every one of the 18 currently-open PRs would stop matching this filter,reuse-lintwould never be dispatched, and the required check would sit pending forever with no error surfaced anywhere. All 18 PRs become unmergeable.Note the existing
dev-*glob does not cover this: it requires the hyphen and does not matchnext, sonexthas to be listed explicitly.mkosi-build.ymlis not a required check and itspull_requesttrigger is filtered bypathsonly (no branch filter), so PR runs are unaffected. Only the post-mergepushbuild on the mainline would silently stop firing.Fix
Add
nextalongsidemasterin both files. Keepingmastermeans CI is correct both before and after the rename, so this can merge independently and the rename is not time-coupled to it. A follow-up PR dropsmasterfrom all eight workflows once the rename has landed.Also drop
mainfromspdx-check.yml. This repo has nomainbranch —git ls-remote --heads origin mainis empty andmainappears in no other workflow — so the entry has never matched anything and only adds noise to the filter.Verification
spdx-check.yml->push.branchesandpull_request.branchesboth[master, next]mkosi-build.yml->push.branches[master, next],tags[mkosi-os-v*]unchanged,pull_requeststillpaths-onlymaindoes not exist on origin and is referenced by no other workflow.sdk-tests,rust-checks,reuse-lint, and that all three rulesets target~DEFAULT_BRANCH(so they follow the rename without manual edits).